/**
 *
 * 矩阵
 * https://www.apifox.cn/apidoc/shared-e68234d6-f79f-4d55-9847-d5964ae8f912
 *
 */

import { commonPromise } from '../index.js'

// 跨域代理前缀
// const API_PROXY_PREFIX = '/api'
const API_PROXY_PREFIX = ''
const BASE_URL = process.env.NODE_ENV === 'production' ? process.env.VUE_APP_API_BASE_URL : API_PROXY_PREFIX
// const BASE_URL = process.env.VUE_APP_API_BASE_URL

const matrixApi = {

  // 客户管理 2
  matrixByUserPhone: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/commission/getByUserPhone`, method: 'post' }), // 客户佣金统计数据查询接口
  matrixSelectById: (params) => commonPromise({ params, url: `${BASE_URL}/order/comm/customeruser/selectById`, method: 'get' }), // 旧-客户信息查询接口

  // 下单流程 1
  matrixOrderDetail: (params) => commonPromise({ params, url: `${BASE_URL}/order/customerChannelUser/getOrderDetail`, method: 'get' }), // 获取渠道客户的订单信息

  // 礼包管理 4
  matrixPageList: (data) => commonPromise({ data, url: `${BASE_URL}/goods/gift/pageList`, method: 'post' }), // 礼包列表查询接口
  matrixDetails: (params) => commonPromise({ params, url: `${BASE_URL}/goods/gift/details`, method: 'get' }), // 礼包详情查询接口
  matrixAddOrUpdate: (data) => commonPromise({ data, url: `${BASE_URL}/goods/gift/addOrUpdate`, method: 'post' }), // 礼包新增或修改接口
  matrixSkuDataList: (data) => commonPromise({ data, url: `${BASE_URL}/goods/goods/skuDataList`, method: 'get' }), // 商品sku列表查询接口
  matrixSetPersonelRepurchase: (data) => commonPromise({ data, url: `${BASE_URL}/goods/gift/setPersonelRepurchase`, method: 'post' }), // 设置个人复购佣金比例
  matrixGetPersonelRepurchase: (params) => commonPromise({ params, url: `${BASE_URL}/goods/gift/getPersonelRepurchase`, method: 'get' }), // 查询个人复购佣金比例

  // 身份管理 2
  matrixVipConfig: (params) => commonPromise({ params, url: `${BASE_URL}/goods/vipConfig/get`, method: 'get' }), // 身份配置信息查询接口
  matrixVipConfigSave: (data) => commonPromise({ data, url: `${BASE_URL}/goods/vipConfig/save`, method: 'post' }), // 保存身份配置信息接口

  // 跳转管理 3
  matrixAppNavigate: (data) => commonPromise({ data, url: `${BASE_URL}/basic/appNavigate/pageList`, method: 'post' }), // 平台跳转配置分页列表查询接口
  matrixVipConfigPlatform: (params) => commonPromise({ params, url: `${BASE_URL}/basic/appNavigate/get`, method: 'get' }), // 平台跳转配置详情查询接口
  matrixAppNavigateDetail: (data) => commonPromise({ data, url: `${BASE_URL}/basic/appNavigate/save`, method: 'post' }), // 平台跳转配置保存接口

  // 佣金统计 3
  matrixStatiticsPlatform: (params) => commonPromise({ params, url: `${BASE_URL}/neworder/commission/statitics`, method: 'get' }), // 佣金统计查询接口
  matrixMonthPageListPlatform: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/commission/getMonthPageList`, method: 'post' }), // 佣金查询分页列表接口
  matrixDetailPageListPlatform: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/commission/getDetailPageList`, method: 'post' }), // 佣金详情分页列表查询接口

  // 积分统计 3
  matrixStatiticsIntegral: (params) => commonPromise({ params, url: `${BASE_URL}/neworder/points/statitics`, method: 'get' }), // 积分统计数据查询接口
  matrixMonthPageListIntegral: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/points/getMonthPageList`, method: 'post' }), // 积分月度数据分页查询接口
  matrixDetailPageListIntegral: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/points/getDetailPageList`, method: 'post' }), // 积分详情分页列表查询接口

  // 提现管理 8
  matrixApproverList: (params) => commonPromise({ params, url: `${BASE_URL}/neworder/commissionApply/getApproverList`, method: 'get' }), // 审批人列表查询接口
  matrixPaymentList: (params) => commonPromise({ params, url: `${BASE_URL}/neworder/commissionApply/getPaymentList`, method: 'get' }), // 打款人列表查询接口
  matrixCashPageList: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/commissionApply/getPageList`, method: 'post' }), // 提现分页列表查询接口
  matrixCashPass: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/commissionApply/pass`, method: 'post' }), // 提现申请审核通过接口
  matrixCashNoPass: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/commissionApply/reject`, method: 'post' }), // 提现申请审核不通过接口
  matrixCashPayment: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/commissionApply/payment`, method: 'post' }), // 提现申请打款接口
  matrixCashConfig: (params) => commonPromise({ params, url: `${BASE_URL}/neworder/commissionApply/getConfig`, method: 'get' }), // 提现设置数据查询接口
  matrixCashConfigSave: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/commissionApply/saveConfig`, method: 'post' }), // 提现设置数据保存接口
  matrixTotalCount: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/commissionApply/getTotalCount`, method: 'post' }), // 提现列表汇总统计接口

  // 用户运营看板 8
  matrixUserBoardData: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/userStatitics/getBoardData`, method: 'post' }), // 获取用户环比数据
  matrixUserPlatformData: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/userStatitics/getUserPlatformData`, method: 'post' }), // 各平台客户来源占比查询接口
  matrixUserPlatformDat: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/userStatitics/exportUserPlatformData`, method: 'post' }), // 各平台客户来源占比导出接口
  matrixUserVipData: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/userStatitics/getVipData`, method: 'post' }), // 各等级占比查询接口
  matrixUserExportVipData: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/userStatitics/exportVipData`, method: 'post' }), // 各等级占比导出接口
  matrixUserVipGoodsPreferenceData: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/userStatitics/getVipGoodsPreferenceData`, method: 'post' }), // 会员推荐产品偏好查询接口
  matrixUserGMV: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/userStatitics/getUserGMV`, method: 'post' }), // 各等级推荐用户GMV贡献查询接口
  matrixUserRecommendRankingList: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/userStatitics/getUserRecommendRankingList`, method: 'post' }), // 客户拉新排行榜查询接口

  // 同步订单
  orderMessage: (params) => commonPromise({ params, url: `${BASE_URL}/order/message/websocket/handle/syncOrder`, method: 'get' }) // 同步订单

}

export default matrixApi
